/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.server.modules.sys.entity.settlement;

import com.server.modules.sys.entity.settlement.item.SettlementItem;
import org.hibernate.validator.constraints.Length;

import com.server.common.persistence.DataEntity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 结算总表Entity
 * @author 丁光彪
 * @version 2016-11-21
 */
public class Settlement extends DataEntity<Settlement> {
	
	private static final long serialVersionUID = 1L;
	protected String customPayId;		// 申请单id
	protected String memberId;		// 客户id
	protected String orders;		// 流水号
	protected long amountOut;		// 支出金额
	protected long amountIn;		// 收入金额
	protected Date settlementDate;	// 结算日期
	protected String type;		// 结算方式 0.结算收款 1.结算退款 2.结算付款 3.后台付订金 4.app付订金
	public String getCustomPayId() {
		return customPayId;
	}

	public void setCustomPayId(String customPayId) {
		this.customPayId = customPayId;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Date getSettlementDate() {
		return settlementDate;
	}

	public void setSettlementDate(Date settlementDate) {
		this.settlementDate = settlementDate;
	}

	List<SettlementItem> items=new ArrayList<>();
	public List<SettlementItem> getItems() {
		return items;
	}
	public void setItems(List<SettlementItem> items) {
		this.items = items;
	}
	public Settlement() {
		super();
	}

	public Settlement(String id){
		super(id);
	}

	@Length(min=1, max=64, message="客户id长度必须介于 1 和 64 之间")
	public String getMemberId() {
		return memberId;
	}

	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}
	
	@Length(min=0, max=128, message="流水号长度必须介于 0 和 128 之间")
	public String getOrders() {
		return orders;
	}

	public void setOrders(String orders) {
		this.orders = orders;
	}
	
	@Length(min=0, max=18, message="支出金额长度必须介于 0 和 18 之间")
	public long getAmountOut() {
		return amountOut;
	}

	public void setAmountOut(long amountOut) {
		this.amountOut = amountOut;
	}
	
	@Length(min=1, max=18, message="收入金额长度必须介于 1 和 18 之间")
	public long getAmountIn() {
		return amountIn;
	}

	public void setAmountIn(long amountIn) {
		this.amountIn = amountIn;
	}
	
}